<?php

/**
 * Smarty {muffin_showPanel} function plugin
 *
 * Type:     function
 * Name:     muffin_showpanel
 * Purpose:  Show the admin panel
 * 
 * @author Kozie <flamefingers at gmail dot com>
 * @param array $params
 * @param Smarty
 */

function smarty_function_muffin_showPanel( $params, &$smarty )
{
	// Muffin declareren
	$m	= Muffin::instance();
	
	if ( true )
	{
		$return = '<div id="muffin_panel">';
		
			// Items here !!!
			$return .= '<a href="index.php?mode=addnews" rel="shadowbox;width=600;height=450" title="Add News">Add News</a> &bull; ';
			$return .= '<a href="index.php?mode=logout">Logout</a>';
		
		$return .= '</div>';
	}

	if ( $m->checkSession() )
		return $return;
	else 
		return false;
}

?>